<!-- 根组件 -->
<template>
  <div style="height:100%" :class="'theme-'+ $store.state.theme">
    <title>{{ config.webTitle }}</title>
    <router-view></router-view>
  </div>
</template>

<script>
export default {
  data: function() {
    return {};
  },
  computed: {
    config: function() {
      return this.$store.state.config;
    }
  },
  created: function() {
    this.$router.push("/main");
    var that = this;
    // this.$axios.get("sys/config").then(resp => {
    //   that.$store.commit("setConfig", resp.data);
    //   that.$axios.get("currentUser/logined").then(resp => {
    //     if (resp.data) {
    //       that.$axios.get("currentUser/currentUser").then(resp => {
    //         that.$store.commit("setCurrentUser", resp.data);
    //         that.$store.commit("setInited", true);
    //         that.$router.push("/main");
    //       });
    //     } else {
    //       that.$router.push("/login");
    //     }
    //   });
    // });
  },
  methods: {}
};
</script>
<style scoped>
header {
  padding: 0;
}
main {
  padding: 15px;
}
</style>
<style>
#nprogress .bar {
  background: rgb(240, 255, 251) !important;
}
</style>